home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / EnterAct 3.5 / Drag_on Modules / hAWK example progs / $Test_list_nested < prev    next >
Encoding:
Text File  |  1994-01-26  |  533 b   |  29 lines  |  [TEXT/KEEN]

  1. #$Test_list_nested : pass one file, prints files and folders
  2. #at the same level.
  3.  
  4. BEGIN {
  5.     print ARGV[1]
  6.     print ""
  7.     n = list(ARGV[1], ind)
  8.     for (i = 1; i <= n; ++i)
  9.         {
  10.         z = split(ind[i], names, ":")
  11.         print names[z], fdate(ind[i]), fsize(ind[i])
  12.         }
  13.     if (n == 0)
  14.         print "No files found. "
  15.     print ""
  16.     
  17.     n = nested(ARGV[1], ind)
  18.     if (n+0 != 0)
  19.         print "Nested directories:"
  20.     for (i = 1; i <= n; ++i)
  21.         {
  22.         ##z = split(ind[i], names, ":")
  23.         ##print names[z]
  24.         print ind[i]
  25.         }
  26.     if (n == 0)
  27.         print "No nested directories found. "
  28.     }
  29.